package com.joysuch.wwyt.workflow.service;

import com.joysuch.wwyt.core.common.ajax.ResultBean;
import com.joysuch.wwyt.core.exception.ApiBusinessException;
import com.joysuch.wwyt.core.exception.ApiCoreException;
import com.joysuch.wwyt.workflow.bean.WorkFlowExecuteTaskBean;
import com.joysuch.wwyt.workflow.bean.WorkFlowTaskCreateBean;
import com.joysuch.wwyt.workflow.bean.WorkFlowTaskQueryBean;
import com.joysuch.wwyt.workflow.bean.vo.RelatedTaskInfoVO;
import com.joysuch.wwyt.workflow.entity.WorkFlowTask;
import org.springframework.data.domain.Pageable;

import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.List;

public interface WorkFlowTaskService {

    ResultBean getTaskById(Long id);

    ResultBean submitTask(WorkFlowExecuteTaskBean taskBean, HttpServletRequest request) throws ApiCoreException;

    void deleteTask(Long id, Integer flag ,String comments) throws ApiCoreException;

    Long saveTask(WorkFlowExecuteTaskBean taskBean,boolean typeFlag) throws ApiBusinessException, IOException;

    Long tempSaveTask(WorkFlowExecuteTaskBean taskBean) throws ApiBusinessException, IOException;

    String createNewTask(WorkFlowTaskCreateBean bean, HttpServletRequest request) throws ApiBusinessException;

    ResultBean findTaskList(WorkFlowTaskQueryBean queryBean, Pageable pageable);

    void updateAppStatus(Long id, String status);

    ResultBean taskListVueType(String type, Pageable pageable);

    void setCode(List<WorkFlowTask> taskList);

    RelatedTaskInfoVO getRelatedTaskByCode(String taskCode) throws ApiBusinessException;

    void processDynamicRecords();
}
